'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
    const { router, controller } = app;
    router.get('/', controller.home.index);

    //注册
    router.post('/api/registry',controller.user.registry);

    //登录
    router.post('/api/login',controller.user.login);

    //获取资源列表
    router.get('/api/resource',controller.user.resource);

    //restful风格定义成绩接口
    router.resources('score','/api/score',controller.score);

    //获取今天未录入成绩的人员
    router.get('/api/notScore',controller.score.notScore);

    //搜索
    router.get('/api/search',controller.score.search);
};
